package com.jichangxiu.server.platform.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import com.jichangxiu.common.entity.po.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.List;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("platform_post")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@Schema(description = "岗位实体")
public class PlatformPost extends BaseEntity implements Serializable {

    @Schema(description = "岗位ID")
    @TableId(value = "post_id", type = IdType.ASSIGN_UUID)
    private String postId;

    @TableField("post_no")
    @Schema(description = "岗位编码")
    private String postNo;

    @TableField("post_code")
    @Schema(description = "岗位标识")
    private String postCode;

    @TableField("post_name")
    @Schema(description = "岗位名称")
    private String postName;

    @TableField("tenant_id")
    @Schema(description = "租户ID")
    private String tenantId;

    @TableField("dept_id")
    @Schema(description = "部门ID")
    private String deptId;

    @TableField("remark")
    @Schema(description = "备注")
    private String remark;

    @TableField("status")
    @Schema(description = "状态（false停用 true正常）")
    private Boolean status;

    @TableLogic
    @TableField("deleted")
    @Schema(description = "是否删除（0否 1是）")
    private String deleted;

    @TableField(exist = false)
    @Schema(description = "状态（0停用 1正常）")
    private List<PlatformUserPost> platformUserPosts;

}
